/*                                    _
 *   ___ _ __ ___ _ __ ___   ___   __| |
 *  / __| '__/ __| '_ ` _ \ / _ \ / _` |
 *  \__ \ |  \__ \ | | | | | (_) | (_| |
 *  |___/_|  |___/_| |_| |_|\___/ \__,_|                              
 *
 *  __|_ _  _  _| _  _ _|._  _  _|   _ _    _  _ _  _    __|_ _   __|_   _ _ 
 * _\ | (_|| |(_|(_|| (_||/_(/_(_|  | (/_\/(_|| | ||_)  _\ | ||_|(_ ||_|| (/_
 *                                                 |    
 * 	Find the latest everything at: 
 *		http://srsmod.googlecode.com/
 *
 */
 
#pragma semicolon 1
#pragma tabsize 4
 
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

#define SRS_VERSION 							"1.9 L4D"
#define SRS_DEBUG 								1
#define SRS_DEBUG_LOG 							1
#define SRS_DEBUG_SPAM 							0


#include "srs.helpers.sp"
#include "srs.statehelpers.sp"

#include "srs.despawninfected.sp"
#include "srs.finaleghostspawnrange.sp"
#include "srs.itemremoval.sp"
#include "srs.tankprelight.sp"
#include "srs.waterbrake.sp"

public Plugin:myinfo = 
{
	name = "Standardized Revamp Structure Modification for L4D",
	author = "srsteam",
	description = "Changes the gameplay, cut-down version for L4D",
	version = SRS_VERSION,
	url = "http://srsmod.googlecode.com/"
}

public OnPluginStart()
{
	StateHelpers_OnPluginStart();
	LoadTranslations("common.phrases");
	LoadTranslations("plugin.srsmod");

	Versioning_CheckDependencies();

	DespawnInfected_OnModuleLoaded();
	FinaleRangeMod_OnModuleLoaded();
	ItemRemoval_OnModuleLoaded();
	TankPrelight_OnModuleLoaded();
	WaterBrake_OnModuleLoaded();
	
	CreateConVar("srs_version", SRS_VERSION, "srsmod version.", SRS_CVAR_DEFAULT_FLAGS | FCVAR_DONTRECORD);
}

public OnPluginEnd()
{
	StateHelpers_OnPluginEnd();
}

public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
	TankPrelight_OnPlayerRunCmd(client, buttons);
	return Plugin_Continue;
}

public OnClientPostAdminCheck(client)
{
	_FR_OnClientPostAdminCheck(client);
}

public OnEntityCreated(entity, const String:classname[])
{
	_DI_OnEntityCreated(entity, classname);
}

public OnEntityDestroyed(entity)
{
	_DI_OnEntityDestroyed(entity);
}

public OnGameFrame()
{
	WaterBrake_OnGameFrame();
}

public OnMapStart()
{
	StateHelpers_OnMapStart();
}

public OnMapEnd()
{
	StateHelpers_OnMapEnd();
}